package de.mmis.core.base.gui;

import de.mmis.core.base.DeserializableAnnotations.ConstructorDeserializable;
import de.mmis.core.base.DeserializableAnnotations.DeserializationConstructor;
import de.mmis.core.base.MethodDescriptor.P;
import de.mmis.core.base.gui.GUIComponent.GUIEvent;

/**
 * GUIEvent thrown whenever a device becomes available or unavailable
 * 
 * @author Christian Koch
 * 
 */
@ConstructorDeserializable(typeIdentifier = "gui/connection-status-event")
public class ConnectionStatusEvent implements GUIEvent {
	private boolean connected;

	@DeserializationConstructor
	public ConnectionStatusEvent(@P("Connected") boolean connected) {
		this.connected = connected;
	}

	public boolean isConnected() {
		return this.connected;
	}
}
